<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        li{
            list-style: none;
        }
         .list1,.list2{
            width: 300px;
            height: 500px;
            margin: 100px 100px;
            text-align: center;
            float: left;
            border: 1px solid #9999;
        }
        .button button{
            width: 100px;
            height: 100px;
            font-size: 30px;
            border-radius: 100px;
            float: left;
            margin-top: 300px;
        }
    </style>
    
</head>
<body>
        <div class="list1">
            <h4><input type="checkbox" id="left-all">列表一</h4>
            <ul id="left-ul">
                <li><input type="checkbox">序号1</li>
                <li><input type="checkbox">序号2</li>
                <li><input type="checkbox">序号3</li>
                <li><input type="checkbox">序号4</li>
                <li><input type="checkbox">序号5</li>
                <li><input type="checkbox">序号6</li>
                <li><input type="checkbox">序号7</li>
                <li><input type="checkbox">序号8</li>
                <li><input type="checkbox">序号9</li>
                <li><input type="checkbox">序号10</li>
            </ul>
        </div>
        <div class="button">
            <button id="rightBtn">></button>
            <button id="leftBtn"><</button>
        </div>
        <div class="list2">
            <h4><input type="checkbox" id="right-all">列表一</h4>
            <ul id="right-ul">
                <li><input type="checkbox">序号1</li>
                <li><input type="checkbox">序号2</li>
                <li><input type="checkbox">序号3</li>
                <li><input type="checkbox">序号4</li>
                
            </ul>
        </div>
</body>
<script>
    $(function(){
        //左边全选
        $('#left-all').click(function(){
        let checkAll  =  $('#left-all').prop('checked')
        $('#left-ul input').prop('checked',checkAll);
        })
        //右边全选
        $('#right-all').click(function(){
            let checkAll = $('#right-all').prop('checked')
        $('#right-ul input').prop('checked',checkAll);
        })
        //向右移动li
        $('#rightBtn').click(function(){
           $('#right-ul').append($('#left-ul input:checked').parent())
            console.log($('#left-ul input:checked'));
        })
          //向左移动li
          $('#leftBtn').click(function(){
           $('#left-ul').append($('#right-ul input:checked').parent())
        
        })
    
    
     

            
    })
</script>
</html>